The present invention relates to devices for use in a packet-based data communication system and particularly to such devices for use in an Ethernet network wherein the packets conform to relevant standards prescribing criteria for xe2x80x98collisionsxe2x80x99 between packets. The invention also relates to devices which are capable of auto-negotiation according to relevant standards. The invention has particular relevance to circumstances wherein a port which is capable of auto-negotiation to establish duplex working does not complete the exchange of information necessary to select between full duplex and half duplex working.
The development of packet-based communication networks such as Ethernet networks and particularly the development of different transmission rates and, also, the need for network devices at respective ends of a communication link to exchange information has led to the establishment of a process known as auto-negotiation, which allows a device to advertise those modes of operation that it possesses to a device at the remote end of a link and to detect, in reply, corresponding operational modes. The general object of auto-negotiation is to provide the means to exchange information between the devices that share each segment and to enable the automatic configuration of both devices to take maximum advantage of the abilities that they have in common. Auto-negotiation is preferably performed according to IEEE Standard, 802.3 (1998 Edition;) using a modified 10 BASE-T link integrity test pulse sequence, as fully described in Clause 28 of that Standard. The function allows the devices to reject the use of operational modes that are not shared by both devices. Where more than one common mode exists between the two devices, auto-negotiation allows the devices to resolve to a single mode of operation using a predetermined sequence using auto-negotiation state machines, which are prescribed to be at the physical layer link of the OSI reference model.
The information about modes of operation supported by the device""s physical layer (PHY) is held in a defined register, which is, for example, defined in Clause 22 of the aforementioned 802.3 Standard Basically, the register has certain bits that represent, for example, whether the device has a full duplex ability at a particular format. For example, the device may have full duplex ability for 100 BASE-X, 100 BASE-T2 and 10 Megabits per second and, if so, the relevant bits will be set in the defined register. If any one of those full duplex abilities are not supported by the device""s PHY, the relevant bit in the respective register is not set and the relevant ability will not be advertised by the devices auto-negotiation process. If the link partners, namely the devices at each end of a link, are both enabled to perform auto-negotiation, there will not be any mismatch of abilities between the link partners. However, a device which is operational to perform auto-negotiation may have a link partner which might either be not capable of auto-negotiation or be so capable but disabled in this respect. Under the circumstances the link may still be established but there can be a mismatch between the abilities of the link partners and in particular a mismatch between half duplex and full duplex working.
The present invention is therefore particularly concerned with improving the operation of a device which has at least one (and normally more than one) port which is capable of auto-negotiation and to render that port capable of detecting and correcting a duplex mismatch, on the assumption that a valid communication link has been made to the port and that a selection between half duplex and full duplex working by auto-negotiation has not been made for the link.
If there is a duplex mismatch on an Ethernet connection the full duplex end will transmit whenever it has a packet to send. It will not monitor the link to see whether it is busy or not. Consequently, unnecessary collisions will be caused when the full duplex end transmits when the half duplex end is already transmitting. The half duplex end will detect the collisions and will re-transmit. However, the full duplex end will not be expecting a collision (which does not occur in full duplex working) and will be unaware that the packet which is in the collision and sent to the half duplex end will have been discarded by the half duplex end. Furthermore, since a duplex connection is an aggressive transmitter, the connection will be susceptible to a xe2x80x98capture effectxe2x80x99 in which the full duplex end disproportionately dominates the link.
xe2x80x98Collisionsxe2x80x99 and xe2x80x98late collisionsxe2x80x99 are standard Ethernet events that are monitored by all Ethernet devices that provide network management of some description. They are both defined in the Ethernet standard. A collision occurs when two Ethernet devices transmit simultaneously and is a normal occurrence on a half duplex Ethernet network. On a half duplex network a device should not transmit if it is receiving data from another device, however due to propagation delay it is possible for two devices to attempt to transmit simultaneously, each device eventually receiving the other packet, this represents a collision. The Standards define a xe2x80x98collisionxe2x80x99 as an interfering signal that occurs within some predetermined time (currently 64 bytes or 512 bits) from the start of the packet. If the collision is detected after a predetermined time from the start of a packet transmission (currently after the first 512 bits) then it is deemed to be a xe2x80x98late collisionxe2x80x99. It normally occurs in an oversize network.
A xe2x80x98fragmentxe2x80x99 is a result of a collision and is also monitored by Ethernet devices and defined by the Ethernet standard. When a collision is detected by a half duplex device that is transmitting, it will immediately stop transmitting the packet. So for a normal collision this will be within 512 bits (or 64 bytes) of the start of the packet. As the packet transmission is not completed the packet will not contain the CRC error checking data that is at the end of every Ethernet packet. Therefore the definition of a fragment is a packet that is shorter than the defined collision window (e.g. 512 bits) and does not have valid CRC data.
The invention is based on the detection of the mismatch by monitoring the occurrence of xe2x80x98late collisionsxe2x80x99, if the number of such late collisions or the rate thereof exceeds a threshold a decision algorithm is triggered. The existence of late collisions indicates either a duplex mismatch or that the rules for a network size have been broken. According to the invention it is possible to distinguish between the two possible causes by examination of the fragments seen oil the port. If the far end of the link is operating at full duplex, then there will be no fragment seen because the other end will not detect any collision and will continue transmitting, so that the half duplex port should always receive a full packet. If the cause is infringement of the network rules, then the half duplex port will receive fragments
A preferred manner of operation according to the invention is to monitor for late collisions in the absence of fragments to detect a duplex mismatch and to cause reconfiguration of a half duplex port to a full duplex port if there be a duplex mismatch. Preferably there is continued monitoring for fragments so that if fragments are still detected then it will be known that an error has been made and the connection should revert to half duplex, since the cause of the fragments must be an infringement of network rules.
Further objects and features of the invention will be apparent from the description that follows by way of example.